<div id="friends">
  <div *ngIf="loading" class="empty-tip">加载中…</div>
  <div *ngIf="!loading">
    <ons-list>
      <ons-list-item>
        <div class="middle">好友总数</div>
        <div class="right">{{non_directer}}人</div>
      </ons-list-item>
      <ons-list-item>
        <div class="middle">直推奖励</div>
        <div class="right">{{direct_profit_sum}}</div>
      </ons-list-item>
      <div *ngIf="user.isAgent">
        <ons-list-item>
          <div class="middle">
            代理分润
          </div>
          <div class="right">
            {{agent_profit_sum}}
          </div>
        </ons-list-item>
        <ons-list-item>
          <div class="middle">
            推荐奖励
          </div>
          <div class="right">
            {{agent_direct_profit_sum}}
          </div>
        </ons-list-item>
      </div>
    </ons-list>
    <div style="margin-top:10px"></div>
    <ons-list>
      <ons-list-item>
        <div id="friends_order">
          <div class="grey" [ngClass]="order==='time'?'highlight':''" (click)="clickOrder($event, 'time')">时间排序</div>
          <div class="grey" [ngClass]="order==='count'?'highlight':''" (click)="clickOrder($event, 'count')">分润排序</div>
        </div>
      </ons-list-item>
      <ons-list-item *ngFor="let l of list">
        <div class="middle">
          {{l.nickname}}
        </div>
        <div class="right">
          +{{l.change_score}}
        </div>
      </ons-list-item>
    </ons-list>
    <div class="empty-tip" *ngIf="!list.length && !loadMore.loading">
      暂无数据
    </div>
    <div class="empty-tip" *ngIf="loadMore.loading">加载中…</div>
  </div>
</div>
